import React, { useState } from 'react'
import { View, Button, Input } from '@tarojs/components'
import './index.scss'
const Search = (props) => {
    const { onChange, placeholder, } = props
    const [data, setData] = useState('')
    return <View className='SearchInit_search_box'>
        <View className='SearchInit_search_info'>
            <View className='SearchInit_search_icon'>
            </View>
            <Input placeholderClass={'default_placeholder'} value={data} onInput={(e) => { setData(e.detail.value) }} placeholder={placeholder} className='SearchInit_search_input'>
            </Input>
            <View className='SearchInit_search_liner'>
            </View>
            <View onClick={() => onChange(data)} className='SearchInit_search_btn'>
                搜索
            </View>
        </View>
    </View>
}
export default Search